package zxq.rollcall.course.controller.action;

import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import zxq.rollcall.course.entity.dto.ResultDTO;
import zxq.rollcall.course.entity.dto.set.ClassDTO;
import zxq.rollcall.course.entity.query.ClassQuery;
import zxq.rollcall.course.entity.query.PageQuery;

import java.util.List;

@Transactional
public interface IClassController {

    /**
     * 存储班级信息
     * @param classQuery 班级信息
     * @return
     */
   @PostMapping(value = "/save",produces = MediaType.APPLICATION_JSON_VALUE)
   @ApiOperation(value = "存储班级信息",notes = "存储班级信息")
   @ResponseBody
   ResultDTO<Boolean> save(ClassQuery classQuery);

    /**
     * 修改班级信息
     * @param id 班级id
     * @param classQuery 班级信息
     * @return
     */
   @PostMapping(value = "/update",produces = MediaType.APPLICATION_JSON_VALUE)
   @ApiOperation(value = "修改班级信息",notes = "修改班级信息")
   @ResponseBody
   ResultDTO<Boolean> update(Integer id,ClassQuery classQuery);

    /**
     * 删除班级信息
     * @param id 班级id
     * @return
     */
    @PostMapping(value = "/delete",produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "删除班级信息",notes = "删除班级信息")
    @ResponseBody
    ResultDTO<Boolean> delete(Integer id);

    /**
     * 查询班级信息
     * @param pageQuery 页码信息
     * @return
     */
   @GetMapping(value = "/query",produces = MediaType.APPLICATION_JSON_VALUE)
   @ApiOperation(value = "查询班级信息",notes = "查询班级信息")
   @ResponseBody
   ResultDTO<List<ClassDTO>> query(PageQuery pageQuery);
   

}
